//
// Created by miaomiaole on 2023/5/16.
//

#ifndef CMAKECXX_OBJECT_01_H
#define CMAKECXX_OBJECT_01_H

#include <iostream>

using namespace std;


class Object_01 {
    void *data;
    const int size;
    const char id;
public:
    Object_01(int sz, char c) : size(sz), id(c) {
        data = new char[size];
        cout << "Constructing object_01 " << id << ", size = " << size << endl;
    }

    ~Object_01() {
        cout << "Destructing object " << id << endl;
        delete[] data;
    }
};


#endif //CMAKECXX_OBJECT_01_H
